<template>
  <div class="container_1">
    <h2>子组件 2</h2>
    <p>当前计数: {{ props.count }}</p>
  </div>
</template>

<script setup>
import {watch,ref } from 'vue';

const props = defineProps(['count']);
// const count = ref('231')
watch(() => props.count,(value) => {
  console.log(value)
})
</script>

<style scoped>
h2 {
  color: #e74c3c;
}

.container_1 {
  text-align: center;
  margin-top: 50px;
  background-color: rgb(235, 235, 235);
  border-radius: 15px;
  padding: 10px;
  margin: 20px;
}
</style>